package com.tho.ccolor;

public class ColorDistance implements Comparable<ColorDistance>{
	private int x;
	private int y;
	private float distance;
	
	public ColorDistance(int x, int y, float distance) {
		super();
		this.x = x;
		this.y = y;
		this.distance = distance;
	}

	@Override
	public int compareTo(ColorDistance another) {
		if (distance > another.distance){
			return 1;
		}else if (distance < another.distance){
			return -1;
		}
		return 0;
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public float getDistance() {
		return distance;
	}

	public void setDistance(float distance) {
		this.distance = distance;
	}	
}
